<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="Styles/msgBoxLight.css" rel="stylesheet" type="text/css" />
        <script type='text/javascript' src='Scripts/jquery-1.8.0.min.js'></script>
        <script type='text/javascript' src='Scripts/jquery.msgBox.js'></script>
        <script type='text/javascript'>
            function example1() {
                $.msgBox({
                    title: "Selam / Hello",
                    content: "Merhaba DÃ¼nya! / Hello World!"
                });
            }
            function example2() {
                $.msgBox({
                    title: "Selam / Hello",
                    content: "Merhaba DÃ¼nya! / Hello World!",
                    type: "info"
                });
            }
            function example3() {
                $.msgBox({
                    type: "prompt",
                    title: "Xác nhận thanh toán",
                    inputs: [{header: "Tên khách", type: "text", name: "customer_name"}],
                    buttons: [{value: "Yes"}, {value: "Cancel"}],
                    success: function(result, values) {
                        
                        $(values).each(function(index, input) {
                            v = input.name + " : " + input.value;
                        });
                        alert(v);
                    }
                });
            }
            function example4() {
                $.msgBox({
                    title: "Ooops",
                    content: "Ohh dear! You broke it!!!",
                    type: "error",
                    buttons: [{value: "Ok"}],
                    afterShow: function(result) {
                        alert("Message has been shown!");
                    }
                });
            }
            function example5() {
                $.msgBox({
                    title: "Ooops",
                    content: "Ohh dear! You broke it!!!",
                    type: "error",
                    beforeClose: function() {
                        alert("Message will be closed!");
                    },
                    showButtons: false,
                    opacity: 0.9
                });
            }
            function example6() {
                $.msgBox({
                    title: "Ooops",
                    content: "Ohh dear! You broke it!!!",
                    type: "error",
                    showButtons: false,
                    opacity: 0.9,
                    autoClose: true
                });
            }
            function example7() {
                $.msgBox({type: "prompt",
                    title: "Xác nhận thanh toán",
                    inputs: [{header: "Tên khách", type: "text", name: "customer_name"}],
                    buttons: [
                        {value: "Chấp nhận"}, {value: "Hủy bỏ"}],
                    success: function(result, values) {
                        var v = result + " has been clicked\n";
                        $(values).each(function(index, input) {
                            v += input.name + " : " + input.value +
                                    (input.checked != null ? (" - checked: " + input.checked) : "") + "\n";
                        });
                        alert(v);
                    }
                });
            }
            function example8() {
                $.msgBox("Insert your name below:", {type: "prompt"}, function(result) {
                    if (result) {
                        alert("Hello " + result);
                    }
                });
            }
        </script>
    </head>
    <body>

        <div><button  onclick='example3()'>Click here</button></div>
    </body>
</html>
